<!doctype html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <title>填写出版社信息认证资料-夜读书</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="author" content="夜读书">
    <meta name="description" content="加入夜读书文化联盟，共同打造文化的产业盟国，让阅读无处不在。">
    <meta name="keywords" content="夜读书文化联盟，读书,阅读,小说,文学">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="{{ asset('/bootstrap-3.3.5-dist/css/bootstrap.min.css') }}">
    <link rel="stylesheet" href="{{ asset('/style/css/hangye.css') }}">
    <script src="{{ asset('/scripts/jquery/jquery-1.11.3.min.js') }}"></script>
    <script src="{{ asset('/bootstrap-3.3.5-dist/js/bootstrap.min.js') }}"></script>
</head>
<body onload="showpic();">
    @include('hangye.include.chuban_header')
    <div id="detail">
        <form name="form" class="" role="form" action="renzheng_chuban" method="post" enctype="multipart/form-data">
        <input type="hidden" name="_token" value="{{ csrf_token() }}" />
        <div class="site-wrapper dw">
            <div class="info-header">
                <div class="chubantitle">填写主体信息 <span class="fontc">(请务必填写真实有效信息)</span></div>
            </div>
            <div class="info-box">
                <div class="icp-form-item-top-title">单位信息</div>
                <div class="icp-form-item danwei_xingzhi">
                    <div class="icp-form-item-left-title">* 主办单位性质:</div>
                    <div class="icp-form-item-center-content">
                        <select class="icp-form-item-select J_must" name="danwei_xingzhi" id="danwei_xingzhi">
                            <option value="-1">请选择单位性质</option>
                            <option value="1">政府机关</option>
                            <option value="2">事业单位</option>
                            <option value="3">企业</option>
                            <option value="4">社会团体</option>
                            <option value="5">民办非企业</option>
                            <option value="6">外国文化中心</option>
                            <option value="7">群团组织</option>
                        </select>
                        <div id="div1" class="icp-form-item-center-tip"><em class="i-triangle-top"></em>请选择企业性质。</div>
                    </div>
                    <div class="icp-form-item-right-tip">
                        <a class="icp-icon-small-ok"></a>
                        <span class="error">
                            <a class="icp-icon-small-error"></a>
                            <div class="icp-form-item-right-message tip-error"><em class="i-triangle-left"></em>请根据网站内容选择主办单位性质</div>
                        </span>
                    </div>
                </div>
                <div class="icp-form-item zhengjian_leixing">
                    <div class="icp-form-item-left-title">* 主办单位证件类型:</div>
                    <div class="icp-form-item-center-content">
                        <select class="icp-form-item-select J_must" name="zhengjian_leixing" id="zhengjian_leixing">
                            <option value="-1">请选择证件类型</option>
                            <option value="1">工商营业执照</option>
                            <option value="2">组织机构代码证书</option>
                            <option value="3">事业法人证书</option>
                        </select>
                        <div id="div1" class="icp-form-item-center-tip"><em class="i-triangle-top"></em>1、企业必须选择工商营业执照；2、其他单位必须选择组织机构代码证。</div>
                    </div>
                    <div class="icp-form-item-right-tip">
                        <a class="icp-icon-small-ok"></a>
                        <span class="error">
                            <a class="icp-icon-small-error"></a>
                            <div class="icp-form-item-right-message tip-error"><em class="i-triangle-left"></em>请选择主办单位证件类型</div>
                        </span>
                    </div>
                </div>
                <div class="icp-form-item danwei_num">
                    <div class="icp-form-item-left-title">* 主办单位证件号码:</div>
                    <div class="icp-form-item-center-content">
                        <input maxlength="50" name="danwei_num" id="danwei_num" value="" class="icp-form-item-text J_must" type="text">
                        <div id="div1" class="icp-form-item-center-tip"><em class="i-triangle-top"></em>请输入与主办单位证件上完全一致的证件号码。</div>
                    </div>
                    <div class="icp-form-item-right-tip">
                        <a class="icp-icon-small-ok"></a>
                        <span class="error">
                            <a class="icp-icon-small-error"></a>
                            <div class="icp-form-item-right-message tip-error"><em class="i-triangle-left"></em>请输入与证件完全一致的证件号码</div>
                        </span>
                    </div>
                </div>
                <div class="icp-form-item danwei_name">
                    <div class="icp-form-item-left-title">* 主办单位名称:</div>
                    <div class="icp-form-item-center-content">
                        <input maxlength="120" name="danwei_name" id="danwei_name" value="" class="icp-form-item-text J_must" type="text">
                        <div id="div1" class="icp-form-item-center-tip"><em class="i-triangle-top"></em>请输入与主办单位证件上完全一致的名称。</div>
                    </div>
                    <div class="icp-form-item-right-tip">
                        <a class="icp-icon-small-ok"></a>
                        <span class="error">
                            <a class="icp-icon-small-error"></a>
                            <div class="icp-form-item-right-message tip-error"><em class="i-triangle-left"></em>请输入与主办单位证件上完全一致的名称</div>
                        </span>
                    </div>
                </div>
                <div class="icp-form-item danwei_dizhi">
                    <div class="icp-form-item-left-title">* 主办单位证件地址:</div>
                    <div class="icp-form-item-center-content">
                        <input maxlength="120" name="danwei_dizhi" id="danwei_dizhi" value="" class="icp-form-item-text J_must" type="text">
                    </div>
                    <div class="icp-form-item-right-tip">
                        <a class="icp-icon-small-ok"></a>
                        <span class="error">
                            <a class="icp-icon-small-error"></a>
                            <div class="icp-form-item-right-message tip-error"><em class="i-triangle-left"></em>请输入与主办单位证件上完全一致的地址</div>
                        </span>
                    </div>
                </div>

                <div class="icp-form-item-top-title" style="clear:both;padding-top:30px;">主办单位负责人信息</div>
                <div class="icp-form-item fuzeren">
                    <div class="icp-form-item-left-title">* 负责人姓名:</div>
                    <div class="icp-form-item-center-content">
                        <input maxlength="10" name="fuzeren" id="fuzeren" value="" class="icp-form-item-text J_must" type="text">
                        <div id="div1" class="icp-form-item-center-tip"><em class="i-triangle-top"></em>请填写法定代表人姓名；若法定代表人为外籍公民，请授权给中国公民为负责人。</div>
                    </div>
                    <div class="icp-form-item-right-tip">
                        <a class="icp-icon-small-ok"></a>
                        <span class="error">
                            <a class="icp-icon-small-error"></a>
                            <div class="icp-form-item-right-message tip-error"><em class="i-triangle-left"></em>请填写负责人姓名,其中不能包含 先生、小姐、个人</div>
                        </span>
                    </div>
                </div>
                <div class="icp-form-item fuzeren_zhengjian">
                    <div class="icp-form-item-left-title">* 负责人证件类型:</div>
                    <div class="icp-form-item-center-content">
                        <select class="icp-form-item-select J_must" name="fuzeren_zhengjian" id="fuzeren_zhengjian">
                            <option value="-1">请选择负责人证件类型</option>
                            <option value="1">身份证</option>
                            <option value="2">护照</option>
                            <option value="3">军官证</option>
                            <option value="4">台胞证</option>
                        </select>
                    </div>
                    <div class="icp-form-item-right-tip">
                        <a class="icp-icon-small-ok"></a>
                        <span class="error">
                            <a class="icp-icon-small-error"></a>
                            <div class="icp-form-item-right-message tip-error"><em class="i-triangle-left"></em>请选择身份类型。</div>
                        </span>
                    </div>
                </div>
                <div class="icp-form-item fuzeren_num">
                    <div class="icp-form-item-left-title">* 负责人证件号码:</div>
                    <div class="icp-form-item-center-content">
                        <input maxlength="30" name="fuzeren_num" id="fuzeren_num" value="" class="icp-form-item-text J_must" type="text">
                    </div>
                    <div class="icp-form-item-right-tip">
                        <a class="icp-icon-small-ok"></a>
                        <span class="error">
                            <a class="icp-icon-small-error"></a>
                            <div class="icp-form-item-right-message tip-error"><em class="i-triangle-left"></em>请输入负责人证件号码</div>
                        </span>
                    </div>
                </div>
                <div class="icp-form-item dianhua">
                    <div class="icp-form-item-left-title">* 联系电话:</div>
                    <div class="icp-form-item-center-content">
                        <input maxlength="15" name="dianhua" id="dianhua" value="" class="icp-form-item-text J_must" type="text">
                        <div id="div1" class="icp-form-item-center-tip"><em class="i-triangle-top"></em>
                        请请输入真实准确的手机号码，并保持号码畅通，用于审核联系。</div>
                    </div>
                    <div class="icp-form-item-right-tip">
                        <a class="icp-icon-small-ok"></a>
                        <span class="error">
                            <a class="icp-icon-small-error"></a>
                            <div class="icp-form-item-right-message tip-error"><em class="i-triangle-left"></em>请请输入真实准确的手机号码</div>
                        </span>
                    </div>
                </div>
                <div class="icp-form-item qq">
                    <div class="icp-form-item-left-title">* QQ号码:</div>
                    <div class="icp-form-item-center-content">
                        <input maxlength="15" name="qq" id="qq" value="" class="icp-form-item-text J_must" type="text">
                    </div>
                    <div class="icp-form-item-right-tip">
                        <a class="icp-icon-small-ok"></a>
                        <span class="error">
                            <a class="icp-icon-small-error"></a>
                            <div class="icp-form-item-right-message tip-error"><em class="i-triangle-left"></em>请输入负责人QQ号码</div>
                        </span>
                    </div>
                </div>
                <div class="icp-form-item email">
                    <div class="icp-form-item-left-title">* 电子邮件地址:</div>
                    <div class="icp-form-item-center-content">
                        <input maxlength="255" name="email" id="email" value="" class="icp-form-item-text J_must" type="text">
                    </div>
                    <div class="icp-form-item-right-tip">
                        <a class="icp-icon-small-ok"></a>
                        <span class="error">
                            <a class="icp-icon-small-error"></a>
                            <div class="icp-form-item-right-message tip-error"><em class="i-triangle-left"></em>信箱用于审核消息接收，请准确填写。</div>
                        </span>
                    </div>
                </div>
                <div class="icp-form-item beizhu">
                    <div class="icp-form-item-left-title">备注:</div>
                    <div class="icp-form-item-center-content">
                        <textarea maxlength="150" id="beizhu" name="beizhu" rows="3" cols="49" class="icp-form-item-textarea"></textarea>
                    </div>
                    <div class="icp-form-item-right-tip">
                        <a class="icp-icon-small-ok"></a>
                        <span class="error">
                            <a class="icp-icon-small-error"></a>
                            <div class="icp-form-item-right-message tip-error"><em class="i-triangle-left"></em>未尽事宜的说明。</div>
                        </span>
                    </div>
                </div>

                <div class="icp-form-item-top-title" style="clear:both;padding-top:30px;">上传资料</div>
                <!--上传身份证-->
                <div class="icp-upload-block-title">
                    <span>*上传主体负责人的身份证信息：</span>     
                </div>
                <div class="icp-upload-block">
                    <div class="clear-fix">
                        <div class="icp-upload-left-upload">
                            <div class="icp-upload-component multiple-items" style="float:left;margin-right:10px">
                                <div class="icp-upload-component-title">
                                    <label class="icp-upload-component-title-label">身份证正面：</label>
                                </div>
                                <div class="icp-upload-component-content">
                                    <img id="id1_img" width="262" height="182" src="http://www.yedushu.com/images/hangye/uppicico.png">
                                </div>
                                <div class="icp-upload-component-bottom J_upload_linkbar">
                                    <a class="icp-button-main icp-button-size-upload float-left">本地上传</a>
                                    <div class="icp-upload-component-bottom-file">
                                        <input id="id1" name="id1" type="file" accept="image/jpeg,image/x-png,image/gif">
                                    </div>
                                </div>
                            </div>
                            <div class="icp-upload-component multiple-items">
                                <div class="icp-upload-component-title">
                                    <label class="icp-upload-component-title-label">身份证反面：</label>
                                </div>
                                <div class="icp-upload-component-content">
                                    <img id="id2_img" width="262" height="182" src="http://www.yedushu.com/images/hangye/uppicico.png">
                                </div>
                                <div class="icp-upload-component-bottom J_upload_linkbar">
                                    <a class="icp-button-main icp-button-size-upload float-left icp-button-upload-margin J_uploadBtn">本地上传</a>
                                    <div class="icp-upload-component-bottom-file">
                                        <input id="id2" name="id2" type="file" accept="image/jpeg,image/x-png,image/gif">
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="icp-upload-right-legend ">
                            <div class="icp-upload-right-legend-title">示例：</div>
                            <div class="icp-upload-right-legend-content">
                                <div class="icp-upload-right-legend-component multiple-items">
                                    <div class="icp-upload-right-legend-component-content upload-example-imgCon">
                                        <img src="http://www.yedushu.com/images/hangye/img_id1.gif">
                                    </div>
                                    <div class="icp-upload-right-legend-component-bottom">
                                        <div class="float-left nowrap">正面</div>
                                        <div class="float-right">
                                            <a class="link-color margin-left-10 J_showPic" href="javascript:;">查看大图</a>
                                        </div>
                                    </div>
                                </div>
                                <div class="icp-upload-right-legend-component multiple-items">
                                    <div class="icp-upload-right-legend-component-content">
                                        <img src="http://www.yedushu.com/images/hangye/img_id2.gif">
                                    </div>
                                    <div class="icp-upload-right-legend-component-bottom">
                                        <div class="float-left nowrap">反面</div>
                                            <div class="float-right">
                                                <a class="link-color margin-left-10 J_showPic" href="javascript:;">查看大图</a>
                                            </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <!--上传身份证end-->

                <!--上传工商营业执照-->
                <div class="icp-upload-block-title ">
                    <span>*上传工商营业执照信息：</span>     
                </div>
                <div class="icp-upload-block">
                    <div class="clear-fix">
                        <div class="icp-upload-left-upload">
                            <div class="icp-upload-component multiple-items" style="float:left;margin-right:10px">
                                <div class="icp-upload-component-title">
                                    <label class="icp-upload-component-title-label">工商营业执照：</label>
                                </div>
                                <div class="icp-upload-component-content">
                                    <img id="gs_img" width="262" height="182" src="http://www.yedushu.com/images/hangye/uppicico.png">
                                </div>
                                <div class="icp-upload-component-bottom J_upload_linkbar">
                                    <a class="icp-button-main icp-button-size-upload float-left">本地上传</a>
                                    <div class="icp-upload-component-bottom-file">
                                        <input id="gs" name="gs" type="file" accept="image/jpeg,image/x-png,image/gif">
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="icp-upload-right-legend ">
                            <div class="icp-upload-right-legend-title">示例：</div>
                            <div class="icp-upload-right-legend-content">
                                <div class="icp-upload-right-legend-component multiple-items">
                                    <div class="icp-upload-right-legend-component-content upload-example-imgCon">
                                        <img src="http://www.yedushu.com/images/hangye/img_qy.gif">
                                    </div>
                                    <div class="icp-upload-right-legend-component-bottom">
                                        <div class="float-left nowrap">副本</div>
                                        <div class="float-right">
                                            <a class="link-color margin-left-10 J_showPic" href="javascript:;">查看大图</a>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <!--上传工商营业执照end-->
                <div class="btcenter">
                    <button type="button" id="okbutton" class="icp-button-main icp-button-size-large">提交认证资料</button>
                </div>
                <div style="clear:both;padding-bottom:10px;"></div>
            </div>

            <div class="" style="padding: 10px 0;"></div>
        </div>
        </form>
    </div>
    
    @include('hangye.include.footer')

<script>
    $(document).ready(function(){
        $("#okbutton").click(function(){ //提交按钮事件
            //单位性质
            var myqq = /^[0-9]{5,10}$/;
            if($.trim($("#danwei_xingzhi").val())=="-1")
            {
                $(".danwei_xingzhi .error").css("visibility","visible");
                $("#danwei_xingzhi").focus();
            }

            //主办单位证件类型
            else if($.trim($("#zhengjian_leixing").val())=="-1")
            {
                $(".zhengjian_leixing .error").css("visibility","visible");
                $("#zhengjian_leixing").focus();
            }

            //主办单位证件号码
            else if($.trim($("#danwei_num").val())=="")
            {
                $(".danwei_num .error").css("visibility","visible");
                $("#danwei_num").focus();
            }

            //主办单位名称
            else if($.trim($("#danwei_name").val())=="")
            {
                $(".danwei_name .error").css("visibility","visible");
                $("#danwei_name").focus();
            }

            //主办单位证件地址
            else if($.trim($("#danwei_dizhi").val())=="")
            {
                $(".danwei_dizhi .error").css("visibility","visible");
                $("#danwei_dizhi").focus();
            }

            //负责人姓名
            else if($.trim($("#fuzeren").val())=="")
            {
                $(".fuzeren .error").css("visibility","visible");
                $("#fuzeren").focus();
            }

            //负责人证件类型
            else if($.trim($("#fuzeren_zhengjian").val())=="-1")
            {
                $(".fuzeren_zhengjian .error").css("visibility","visible");
                $("#fuzeren_zhengjian").focus();
            }

            //负责人证件号码
            else if($.trim($("#fuzeren_num").val())=="")
            {
                $(".fuzeren_num .error").css("visibility","visible");
                $("#fuzeren_num").focus();
            }

            //联系电话
            else if($.trim($("#dianhua").val())=="")
            {
                $(".dianhua .error").css("visibility","visible");
                $("#dianhua").focus();
            }

            //QQ号码
            else if(!myqq.test($("#qq").val()))
            {
                $(".qq .error").css("visibility","visible");
                $("#qq").focus();
            }

            //电子邮件地址
            else if(!isEmail($.trim($("#email").val())))
            {
                $(".email .error").css("visibility","visible");
                $("#email").focus();
            }

            //判断是否上传身份证图片
            else if($.trim($("#id1").val())=="" || $.trim($("#id2").val())=="") 
            {
                alert("请上传身份证图片！");
            }

            //判断是否上传工商营业执照
            else if($.trim($("#gs").val())=="") 
            {
                alert("请上传工商营业执照信息！");
            }

            //上传数据,保存认证数据
            else {
                form.submit();
            }

        });

        /////////////提交按钮end


        $("#danwei_xingzhi").change(function(){ //改变事件            
            //单位性质
            if($.trim($("#danwei_xingzhi").val())!="-1")
            {
                $(".danwei_xingzhi .icp-icon-small-ok").css("visibility","visible");
                $(".danwei_xingzhi .icp-icon-small-ok").css("display","inline-block");
                $(".danwei_xingzhi .error").css("visibility","hidden");
            }
            else {
                $(".danwei_xingzhi .error").css("visibility","visible"); 
                $(".danwei_xingzhi .icp-icon-small-ok").css("display","none");
            }
        });

        $("#zhengjian_leixing").change(function(){ //改变事件
            //主办单位证件类型
            if($.trim($("#zhengjian_leixing").val())!="-1")
            {
                $(".zhengjian_leixing .icp-icon-small-ok").css("visibility","visible");
                $(".zhengjian_leixing .icp-icon-small-ok").css("display","inline-block");
                $(".zhengjian_leixing .error").css("visibility","hidden");
            }
            else {
                $(".zhengjian_leixing .error").css("visibility","visible"); 
                $(".zhengjian_leixing .icp-icon-small-ok").css("display","none");
            }
        });

        $("#fuzeren_zhengjian").change(function(){ //改变事件
            //负责人证件类型
            if($.trim($("#fuzeren_zhengjian").val())!="-1")
            {
                $(".fuzeren_zhengjian .icp-icon-small-ok").css("visibility","visible");
                $(".fuzeren_zhengjian .icp-icon-small-ok").css("display","inline-block");
                $(".fuzeren_zhengjian .error").css("visibility","hidden");
            }
            else {
                $(".fuzeren_zhengjian .error").css("visibility","visible"); 
                $(".fuzeren_zhengjian .icp-icon-small-ok").css("display","none");
            }
        });

        ///////////////改变事件end

        $("#danwei_xingzhi").blur(function(){ //失去焦点
            //单位性质
            if($.trim($("#danwei_xingzhi").val())!="-1")
            {
                $(".danwei_xingzhi .icp-icon-small-ok").css("visibility","visible");
                $(".danwei_xingzhi .icp-icon-small-ok").css("display","inline-block");
                $(".danwei_xingzhi .error").css("visibility","hidden");
            }
            else {
                $(".danwei_xingzhi .error").css("visibility","visible"); 
                $(".danwei_xingzhi .icp-icon-small-ok").css("display","none");
            }
        });

        $("#zhengjian_leixing").blur(function(){ //失去焦点
            //主办单位证件类型
            if($.trim($("#zhengjian_leixing").val())!="-1")
            {
                $(".zhengjian_leixing .icp-icon-small-ok").css("visibility","visible");
                $(".zhengjian_leixing .icp-icon-small-ok").css("display","inline-block");
                $(".zhengjian_leixing .error").css("visibility","hidden");
            }
            else {
                $(".zhengjian_leixing .error").css("visibility","visible"); 
                $(".zhengjian_leixing .icp-icon-small-ok").css("display","none");
            }
        });

        $("#fuzeren_zhengjian").blur(function(){ //失去焦点
            //单位性质
            if($.trim($("#fuzeren_zhengjian").val())!="-1")
            {
                $(".fuzeren_zhengjian .icp-icon-small-ok").css("visibility","visible");
                $(".fuzeren_zhengjian .icp-icon-small-ok").css("display","inline-block");
                $(".fuzeren_zhengjian .error").css("visibility","hidden");
            }
            else {
                $(".fuzeren_zhengjian .error").css("visibility","visible"); 
                $(".fuzeren_zhengjian .icp-icon-small-ok").css("display","none");
            }
        });

        $("#danwei_num").blur(function(){ //失去焦点
            //主办单位证件号码
            if($.trim($("#danwei_num").val())!="")
            {
                $(".danwei_num .icp-icon-small-ok").css("visibility","visible");
                $(".danwei_num .icp-icon-small-ok").css("display","inline-block");
                $(".danwei_num .error").css("visibility","hidden");
            }
            else {
                $(".danwei_num .error").css("visibility","visible"); 
                $(".danwei_num .icp-icon-small-ok").css("display","none");
            }
        });

        $("#danwei_name").blur(function(){ //失去焦点
            //主办单位名称
            if($.trim($("#danwei_name").val())!="")
            {
                $(".danwei_name .icp-icon-small-ok").css("visibility","visible");
                $(".danwei_name .icp-icon-small-ok").css("display","inline-block");
                $(".danwei_name .error").css("visibility","hidden");
            }
            else {
                $(".danwei_name .error").css("visibility","visible"); 
                $(".danwei_name .icp-icon-small-ok").css("display","none");
            }
        });

        $("#danwei_dizhi").blur(function(){ //失去焦点
            //主办单位证件地址
            if($.trim($("#danwei_dizhi").val())!="")
            {
                $(".danwei_dizhi .icp-icon-small-ok").css("visibility","visible");
                $(".danwei_dizhi .icp-icon-small-ok").css("display","inline-block");
                $(".danwei_dizhi .error").css("visibility","hidden");
            }
            else {
                $(".danwei_dizhi .error").css("visibility","visible"); 
                $(".danwei_dizhi .icp-icon-small-ok").css("display","none");
            }
        });

        $("#fuzeren").blur(function(){ //失去焦点
            //负责人姓名
            if($.trim($("#fuzeren").val())!="")
            {
                $(".fuzeren .icp-icon-small-ok").css("visibility","visible");
                $(".fuzeren .icp-icon-small-ok").css("display","inline-block");
                $(".fuzeren .error").css("visibility","hidden");
            }
            else {
                $(".fuzeren .error").css("visibility","visible"); 
                $(".fuzeren .icp-icon-small-ok").css("display","none");
            }
        });

        $("#fuzeren_num").blur(function(){ //失去焦点
            //负责人证件号码
            if($.trim($("#fuzeren_num").val())!="")
            {
                $(".fuzeren_num .icp-icon-small-ok").css("visibility","visible");
                $(".fuzeren_num .icp-icon-small-ok").css("display","inline-block");
                $(".fuzeren_num .error").css("visibility","hidden");
            }
            else {
                $(".fuzeren_num .error").css("visibility","visible"); 
                $(".fuzeren_num .icp-icon-small-ok").css("display","none");
            }
        });

        $("#dianhua").blur(function(){ //失去焦点
            //联系电话
            var myreg = /^(((13[0-9]{1})|(15[0-9]{1})|(18[0-9]{1}))+\d{8})$/;
            if($.trim($("#dianhua").val())!="" && myreg.test($("#dianhua").val()))
            {
                $(".dianhua .icp-icon-small-ok").css("visibility","visible");
                $(".dianhua .icp-icon-small-ok").css("display","inline-block");
                $(".dianhua .error").css("visibility","hidden");
            }
            else {
                $(".dianhua .error").css("visibility","visible"); 
                $(".dianhua .icp-icon-small-ok").css("display","none");
            }
        });

        $("#qq").blur(function(){ //失去焦点
            //QQ号码
            var myreg = /^[0-9]{5,10}$/;
            if($.trim($("#qq").val())!="" && myreg.test($("#qq").val()))
            {
                $(".qq .icp-icon-small-ok").css("visibility","visible");
                $(".qq .icp-icon-small-ok").css("display","inline-block");
                $(".qq .error").css("visibility","hidden");
            }
            else {
                $(".qq .error").css("visibility","visible"); 
                $(".qq .icp-icon-small-ok").css("display","none");
            }
        });

        $("#email").blur(function(){ //失去焦点
            //电子邮件地址
            if($.trim($("#email").val())!="" && isEmail($.trim($("#email").val())))
            {
                $(".email .icp-icon-small-ok").css("visibility","visible");
                $(".email .icp-icon-small-ok").css("display","inline-block");
                $(".email .error").css("visibility","hidden");
            }
            else {
                $(".email .error").css("visibility","visible"); 
                $(".email .icp-icon-small-ok").css("display","none");
            }
        });

    });

    //////////失去焦点end

    function isEmail(strEmail) {
        //判断是否合法的信箱
        if (strEmail.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) != -1)
            return true;
        else
            return false;
    }    

    /////////图片上传/////////
    $("#id1").change(function(){  //上传身份证正面
        //获取input file的files文件数组;
        //$('#id1')获取的是jQuery对象，.get(0)转为原生对象;
        //这边默认只能选一个，但是存放形式仍然是数组，所以取第一个元素使用[0];
        var file = $('#id1').get(0).files[0];
        if(!/image\/\w+/.test(file.type)){ 
            alert("文件必须为图片！"); 
            return false; 
        }     
        //检查大小,出错则退出，文件不会上传
        if (file.size > 1*1024*1024) {
            alert('上传图片不要大于1M');
            return;
        }
        //创建用来读取此文件的对象
        var reader = new FileReader();
        //使用该对象读取file文件
        reader.readAsDataURL(file);
        //读取文件成功后执行的方法函数
        reader.onload=function(e){
        //读取成功后返回的一个参数e，整个的一个进度事件
        console.log(e);
        //选择所要显示图片的img，要赋值给img的src就是e中target下result里面
        //的base64编码格式的地址
        $('#id1_img').get(0).src = e.target.result;
      }
    });

    $("#id2").change(function(){  //上传身份证反面
        //获取input file的files文件数组;
        //$('#id1')获取的是jQuery对象，.get(0)转为原生对象;
        //这边默认只能选一个，但是存放形式仍然是数组，所以取第一个元素使用[0];
        var file = $('#id2').get(0).files[0];
        if(!/image\/\w+/.test(file.type)){ 
            alert("文件必须为图片！"); 
            return false; 
        }     
        //检查大小,出错则退出，文件不会上传
        if (file.size > 1*1024*1024) {
            alert('上传图片不要大于1M');
            return;
        }
        //创建用来读取此文件的对象
        var reader = new FileReader();
        //使用该对象读取file文件
        reader.readAsDataURL(file);
        //读取文件成功后执行的方法函数
        reader.onload=function(e){
            //读取成功后返回的一个参数e，整个的一个进度事件
            console.log(e);
            //选择所要显示图片的img，要赋值给img的src就是e中target下result里面
            //的base64编码格式的地址
            $('#id2_img').get(0).src = e.target.result;
        }
    });

    $("#gs").change(function(){  //上传工商营业执照
        //获取input file的files文件数组;
        //$('#gs')获取的是jQuery对象，.get(0)转为原生对象;
        //这边默认只能选一个，但是存放形式仍然是数组，所以取第一个元素使用[0];
        var file = $('#gs').get(0).files[0];
        if(!/image\/\w+/.test(file.type)){ 
            alert("文件必须为图片！"); 
            return false; 
        }     
        //检查大小,出错则退出，文件不会上传
        if (file.size > 1*1024*1024) {
            alert('上传图片不要大于1M');
            return;
        }
        //创建用来读取此文件的对象
        var reader = new FileReader();
        //使用该对象读取file文件
        reader.readAsDataURL(file);
        //读取文件成功后执行的方法函数
        reader.onload=function(e){
            //读取成功后返回的一个参数e，整个的一个进度事件
            console.log(e);
            //选择所要显示图片的img，要赋值给img的src就是e中target下result里面
             //的base64编码格式的地址
           $('#gs_img').get(0).src = e.target.result;
        }
    });


    function showpic(){
        //刷新页面显示保留已经上传的图片
        if($.trim($("#id1").val())!=""){
            var file = $('#id1').get(0).files[0];
            //创建用来读取此文件的对象
            var reader = new FileReader();
            //使用该对象读取file文件
            reader.readAsDataURL(file);
            //读取文件成功后执行的方法函数
            reader.onload=function(e){
                //读取成功后返回的一个参数e，整个的一个进度事件
                console.log(e);
                //选择所要显示图片的img，要赋值给img的src就是e中target下result里面
                //的base64编码格式的地址
                $('#id1_img').get(0).src = e.target.result;
            }
        }

        if($.trim($("#id2").val())!=""){
            var file = $('#id2').get(0).files[0];
            //创建用来读取此文件的对象
            var reader = new FileReader();
            //使用该对象读取file文件
            reader.readAsDataURL(file);
            //读取文件成功后执行的方法函数
            reader.onload=function(e){
                //读取成功后返回的一个参数e，整个的一个进度事件
                console.log(e);
                //选择所要显示图片的img，要赋值给img的src就是e中target下result里面
                //的base64编码格式的地址
                $('#id2_img').get(0).src = e.target.result;
            }
        }

        if($.trim($("#gs").val())!=""){
            var file = $('#gs').get(0).files[0];
            //创建用来读取此文件的对象
            var reader = new FileReader();
            //使用该对象读取file文件
            reader.readAsDataURL(file);
            //读取文件成功后执行的方法函数
            reader.onload=function(e){
                //读取成功后返回的一个参数e，整个的一个进度事件
                console.log(e);
                //选择所要显示图片的img，要赋值给img的src就是e中target下result里面
                //的base64编码格式的地址
                $('#gs_img').get(0).src = e.target.result;
            }
        }
    }


</script>

</body>
</html>